/*
 * Copyright (c) 2010 Google Inc.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.google.api.data.contacts.v3.model;

import com.google.api.client.util.Key;
import com.google.api.data.gdata.v2.model.When;

/**
 * These elements describe events associated with a contact. Exactly one of the
 * {@link #label} and {@link #type} attributes must be provided.
 * 
 * @author Nicolas Garnier
 */
public class Event {

  /** Used to specify that the event is an Anniversary. */
  public static final String TYPE_ANNIVERSARY = "anniversary";

  /** Used to specify that the event is Other. */
  public static final String TYPE_OTHER = "other";

  /**
   * A programmatic value that identifies the type of event. Valid values are
   * {@link #TYPE_ANNIVERSARY} and {@link #TYPE_OTHER}.
   */
  @Key("@rel")
  public String type;

  /**
   * A simple string value used to name this event. It allows UIs to display a
   * label such as "Start Date". May not be empty or all whitespace.
   */
  @Key("@label")
  public String label;

  /**
   * Gives the time of the event. Warning: not every correct gd:when can be
   * used: its startTime attribute must be of type xs:date.
   */
  @Key("gd:when")
  public When when;
}
